<html>
<head>
<title>Testing Alerts</title>
</head>
<script type='text/javascript'>
function myFunction() {
  let message = prompt('Please enter a message');
  if (message != null) {
    document.getElementById('result').innerHTML =
    'Message: ' + message ;
  }
}
</script>
<style>

</style>
<body  >
<button id='alert' onclick='myFunction()'>Try it</button>
<p id="result"></p>
</body>
</html>